// Domain/Repositories/IFileRepository.cs
using File = UniversalAdmin.Domain.Entities.File;
namespace UniversalAdmin.Domain.Repositories;

public interface IFileRepository : IRepository<File>
{
  // 用户文件查询
  Task<IEnumerable<File>> GetFilesByUserIdAsync(int userId);

  // 文件搜索
  Task<(IEnumerable<File> Items, int TotalCount)> SearchFilesAsync(
      string? keyword = null,
      string? mimeType = null,
      int? userId = null,
      string? userName = null,
      int pageIndex = 1,
      int pageSize = 10);

  // 文件使用统计
  Task<long> GetTotalStorageUsageAsync();
  Task<long> GetUserStorageUsageAsync(int userId);
}